
class PatientMsgListData {
  int? code;
  String? msg;
  MsgDataList? data;

  PatientMsgListData({this.code, this.msg, this.data});

  PatientMsgListData.fromJson(Map<String, dynamic> json) {
    if(json["code"] is int) {
      code = json["code"];
    }
    if(json["msg"] is String) {
      msg = json["msg"];
    }
    if(json["data"] is Map) {
      data = json["data"] == null ? null : MsgDataList.fromJson(json["data"]);
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["code"] = code;
    _data["msg"] = msg;
    if(data != null) {
      _data["data"] = data?.toJson();
    }
    return _data;
  }
}

class MsgDataList {
  int? total;
  List<PatientMsgData>? list;

  MsgDataList({this.total, this.list});

  MsgDataList.fromJson(Map<String, dynamic> json) {
    if(json["total"] is int) {
      total = json["total"];
    }
    if(json["list"] is List) {
      list = json["list"] == null ? null : (json["list"] as List).map((e) => PatientMsgData.fromJson(e)).toList();
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["total"] = total;
    if(list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    return _data;
  }
}

class PatientMsgData {
  int? id;
  String? createBy;
  String? createTime;
  String? doctorNo;
  String? patientNo;
  String? initiatorType;
  String? msgContent;
  String? msgType;
  String? patientname;
  String? avatarUrl;
  String? doctorName;
  String? profilePhoto;

  PatientMsgData({this.id, this.createBy, this.createTime, this.doctorNo, this.patientNo, this.initiatorType, this.msgContent, this.msgType, this.patientname, this.avatarUrl, this.doctorName, this.profilePhoto});

  PatientMsgData.fromJson(Map<String, dynamic> json) {
    if(json["id"] is int) {
      id = json["id"];
    }
    if(json["createBy"] is String) {
      createBy = json["createBy"];
    }
    if(json["createTime"] is String) {
      createTime = json["createTime"];
    }
    if(json["doctorNo"] is String) {
      doctorNo = json["doctorNo"];
    }
    if(json["patientNo"] is String) {
      patientNo = json["patientNo"];
    }
    if(json["initiatorType"] is String) {
      initiatorType = json["initiatorType"];
    }
    if(json["msgContent"] is String) {
      msgContent = json["msgContent"];
    }
    if(json["msgType"] is String) {
      msgType = json["msgType"];
    }
    if(json["patientname"] is String) {
      patientname = json["patientname"];
    }
    if(json["avatarUrl"] is String) {
      avatarUrl = json["avatarUrl"];
    }
    if(json["doctorName"] is String) {
      doctorName = json["doctorName"];
    }
    if(json["profilePhoto"] is String) {
      profilePhoto = json["profilePhoto"];
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["id"] = id;
    _data["createBy"] = createBy;
    _data["createTime"] = createTime;
    _data["doctorNo"] = doctorNo;
    _data["patientNo"] = patientNo;
    _data["initiatorType"] = initiatorType;
    _data["msgContent"] = msgContent;
    _data["msgType"] = msgType;
    _data["patientname"] = patientname;
    _data["avatarUrl"] = avatarUrl;
    _data["doctorName"] = doctorName;
    _data["profilePhoto"] = profilePhoto;
    return _data;
  }
}